package com.example.texturedPoint;

import android.app.Activity;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

public class TexturedPoint extends Activity {
	//create your "drawing board" to do your openGL drawing on
	GLSurfaceView mView;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        //setting the view to be fullscreen
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        
        //create a new drawing board, the board needs access to the application context, so we pass in "this" in the constructor
        mView = new GLSurfaceView(this);
        
        //we tell the board that we will be using openGLES 2.0
        mView.setEGLContextClientVersion(2);
        
        /*here we create our renderer, this is where all the drawing commands will go
        MyRenderer is a custom class that we will create ourselves*/
        mView.setRenderer(new MyRenderer(this));
        
        //we now set the screen to look at our board where we will be drawing
        setContentView(mView);
    }

    //when the application is paused, we tell our board to stop drawing
    @Override
    public void onPause(){
    	super.onPause();
    	mView.onPause();
    }
    
    //and when the application is resumed, we tell our board to start drawing again
    @Override
    public void onResume(){
    	super.onResume();
    	mView.onResume();
    }

    
}
